package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

@Data
public class SystemPostException extends RuntimeException {

    private Integer code;
    SystemPostException(Integer code,String message) {
        super(message);
        this.code = code;

    }

    public SystemPostException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();

    }

}
